home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / type_linux32.h < prev    next >
C/C++ Source or Header  |  2001-05-12  |  1KB  |  80 lines

  1.  
  2. #ifndef _TEK_TYPE_H
  3. #define    _TEK_TYPE_H 1
  4.  
  5. /*
  6. **    type.h
  7. **    types and constants for linux/32bit
  8. */
  9.  
  10.  
  11. #include <netinet/in.h>
  12.  
  13. /*
  14. **    platform specific
  15. */
  16.  
  17. typedef char                TBYTE;
  18. typedef signed char            TINT8;
  19. typedef unsigned char        TUINT8;
  20. typedef signed short        TINT16;
  21. typedef unsigned short        TUINT16;
  22. typedef signed int            TINT;
  23. typedef unsigned int        TUINT;
  24. typedef float                TFLOAT;
  25. typedef    double                TDOUBLE;
  26.  
  27. #define    TALIGN_MINOR        3
  28. #define TALIGN_DEFAULT        7
  29. #define TALIGN_MAJOR        15
  30.  
  31. #define __ELATE_QCALL__(x)
  32.  
  33. #ifdef TDEBUG
  34.     #include <stdio.h>
  35.     #define platform_dbprintf(a)        fprintf(stderr,a)
  36.     #define platform_dbprintf1(a,b)        fprintf(stderr,a,b)
  37.     #define platform_dbprintf2(a,b,c)    fprintf(stderr,a,b,c)
  38. #endif
  39.  
  40.  
  41. /*
  42. **    not platform specific
  43. */
  44.  
  45. typedef void                TVOID;
  46. typedef void *                TAPTR;
  47. typedef TBYTE *                TSTRPTR;
  48. typedef TUINT                TBOOL;
  49. typedef struct
  50. {TBYTE data[16];}            TKNOB;
  51.  
  52. typedef struct                /* time/datestamp */
  53. {
  54.     TUINT sec;                /* seconds */
  55.     TUINT usec;                /* microseconds */
  56. }    TTIME;
  57.  
  58.  
  59.  
  60. #define TNULL                0
  61. #define TTRUE                1
  62. #define TFALSE                0
  63. #define TABS(a)                ((a)>0?(a):-(a))
  64. #define TMIN(a,b)            ((a)<(b)?(a):(b))
  65. #define TMAX(a,b)            ((a)>(b)?(a):(b))
  66. #define TCLAMP(min,x,max)    ((x)>(max)?(max):((x)<(min)?(min):(x)))
  67. #define TPI                    3.14159265358979323846
  68.  
  69.  
  70. #ifdef __cplusplus
  71.     #define TBEGIN_C_API extern "C" {
  72.     #define TEND_C_API }
  73. #else
  74.     #define TBEGIN_C_API
  75.     #define TEND_C_API
  76. #endif
  77.  
  78.  
  79. #endif
  80.